<div id="content" >

<div class="group1">
			<div class="box_search">
					<form action="<?php echo $this->Html->url(array('controller'=>'resourceinfos', 'action' => 'ncth_cat')); ?>" method="POST" id="filter_index_ncth">
						<div class="detail_search">
							<p class="key_title">Nhịp cầu thương hiệu</p>
							
							<div class="select_box">

								<input type="text" name="filter_keyword" value="" class="keyword" style="width:124px !important" />
								<select onchange="$('#filter_index_ncth').submit();" name="filter_city_id">
								    <option value="all"><?php __('Tỉnh/Thành'); ?></option>
								    <?php foreach($cities as $c ) {
									$selected = "";
									if($c["City"]["id"] == $city_id)
									{
									    $selected = 'selected="selected"';
									}
								    ?>
									<option value="<?php echo $c["City"]["id"] ?>" <?php echo $selected; ?> ><?php echo $c["City"]["name"] ?></option>
								    <?php } ?>
								</select>
								<select onchange="$('#filter_index_ncth').submit();" name="filter_district_id" id="ResourceinfoDistrictId">
								    <option value="all">- <?php __('Quận/Huyện'); ?> -</option>
								    <?php foreach($districts as $d ) {
									$selected = "";
									if($d["District"]["id"] == $district_id)
									{
									    $selected = 'selected="selected"';
									}
								    ?>
									<option value="<?php echo $d["District"]["id"] ?>" <?php echo $selected; ?> ><?php echo $d["District"]["name"] ?></option>
								    <?php } ?>
								</select>
								<select onchange="$('#filter_index_ncth').submit();" name="filter_career_id" id="ResourceinfoCareerId">
								    <option value="all">- <?php __('Ngành nghề'); ?> -</option>
								    <?php foreach($careers as $ca ) {
									$selected = "";
									if($ca["Career"]["id"] == $career_id)
									{
									    $selected = 'selected="selected"';
									}
								    ?>
									<option value="<?php echo $ca["Career"]["id"] ?>" <?php echo $selected; ?> ><?php echo $ca["Career"]["name"] ?></option>
								    <?php } ?>
								</select>
							</div><!--end select_box-->
						</div><!-- end detail_search-->
					</form>

				</div><!--end box_search-->					
				
					<?php //echo $this->element('gtdangbai'); ?>
				<div class="table_list">
					<table width="100%" cellspacing="0" cellpadding="0" border="0" id="ncdt">
						<tbody><tr class="title">
							<td colspan="5">&gt;&gt; Logo các công ty</td>

						</tr>
						
						<?php foreach($Resourceinfos_ncth as $k => $item) {
						if($k%5 == 0) echo "<tr>" ;
						?>
									<td><a href="<?php echo $this->Html->url(array('action' => 'view', $item['Resourceinfo']['id'])) ?>" title="<?php echo $item["Resourceinfo"]["o_name"] ?>"><img width="90" height="68" alt="" src="<?php echo $this->Html->url("/uploads/resourceinfo_image/filename/thumb/feature/".$item["ResourceinfoImage"]["filename"]) ?>"></a></td>									
						<?php
						if($k%5 == 3) echo "</tr>" ;
						} ?>
						
						
					</tbody></table>
				
				</div>
</div>

<?php foreach($types as $gg => $type) { ?>

			<div class="group1"  style="margin-top: 20px">
				<div class="box_search">
					<form action="<?php echo $this->Html->url(array('action' => 'category', $type['ResourceinfoType']['id'])); ?>" method="POST" id="filter_index_<?php echo $type['ResourceinfoType']['id'] ?>">
						<div class="detail_search">
							<p class="key_title"><?php echo $type['ResourceinfoType']['name'] ?></p>
							
							<div class="select_box">

								<input type="text" name="filter_keyword" value="" class="keyword" />
								<select onchange="$('#filter_index_<?php echo $type['ResourceinfoType']['id'] ?>').submit();" name="filter_city_id">
								    <option value="all"><?php __('Tỉnh/Thành'); ?></option>
								    <?php foreach($cities as $c ) {
									$selected = "";
									if($c["City"]["id"] == $city_id)
									{
									    $selected = 'selected="selected"';
									}
								    ?>
									<option value="<?php echo $c["City"]["id"] ?>" <?php echo $selected; ?> ><?php echo $c["City"]["name"] ?></option>
								    <?php } ?>
								</select>
								<select onchange="$('#filter_index_<?php echo $type['ResourceinfoType']['id'] ?>').submit();" name="filter_district_id" id="ResourceinfoDistrictId">
								    <option value="all">- <?php __('Quận/Huyện'); ?> -</option>
								    <?php foreach($districts as $d ) {
									$selected = "";
									if($d["District"]["id"] == $district_id)
									{
									    $selected = 'selected="selected"';
									}
								    ?>
									<option value="<?php echo $d["District"]["id"] ?>" <?php echo $selected; ?> ><?php echo $d["District"]["name"] ?></option>
								    <?php } ?>
								</select>
								<select onchange="$('#filter_index_<?php echo $type['ResourceinfoType']['id'] ?>').submit();" name="filter_career_id" id="ResourceinfoCareerId">
								    <option value="all">- <?php __('Ngành nghề'); ?> -</option>
								    <?php foreach($careers as $ca ) {
									$selected = "";
									if($ca["Career"]["id"] == $career_id)
									{
									    $selected = 'selected="selected"';
									}
								    ?>
									<option value="<?php echo $ca["Career"]["id"] ?>" <?php echo $selected; ?> ><?php echo $ca["Career"]["name"] ?></option>
								    <?php } ?>
								</select>
							</div><!--end select_box-->
						</div><!-- end detail_search-->
					</form>

				</div><!--end box_search-->					
				
					
				<div class="table_list">

					<table id="ncdt" width="100%" cellspacing="0" cellpadding="0" border="0">
						<tr class="title">
							<td>Tiêu đề tin</td>
							<td>Địa điểm</td>
							<td>Lĩnh vực</td>
						
							<td>Lượt xem</td>
							<td>Ngày đăng</td>
						</tr>
						<?php foreach($type['products'] as $k => $item) {
							$class = $k%2 == 0 ? "odd" : "even" ;
						?>
									<tr class="<?php echo $class; ?>">
										<td><?php echo $this->Html->link(__($item["Resourceinfo"]["name"], true), array('action' => 'view', $item['Resourceinfo']['id'])); ?></td>

			
										<td><?php echo $item["City"]["name"] ?></td>
										<td><?php echo $item["Career"]["name"] ?></td>
										<td><?php echo $item["Resourceinfo"]["hit"] ?></td>
										<td><?php echo date('d/m/Y', strtotime($item["Resourceinfo"]["create_date"])); ?></td>
									</tr>
						<?php } ?>
						
					</table>
					<p class="read_more"><a href="<?php echo $this->Html->url(array('action' => 'category', $type['ResourceinfoType']['id'])); ?>">Xem thêm >></a></p>

				</div><!--end table_list-->				
			</div><!--end group-->
			

<?php } ?>			
			
			

			
			
			<script type="text/javascript">
			$(function(){
				$('#metadata').html($('#metadataz').html());
			});
						
			</script>
                        